In stepper motors, motor position is controlled by regulating electrical current in each motor winding. Different stepper motor designs may have different numbers of windings, with the current waveform in each winding leading or lagging current waveforms associated with the other windings. For purposes of this disclosure, current regulation in a single winding is referred to as an example of the current regulation in each winding.
The current waveform in a given motor winding is, in many modern implementations, shaped by an output of a digital-to-analog converter (DAC). As is well-known in the art, a DAC output waveform, when viewed with sufficient magnification, is formed in a stair-stepped shape. For each digital input code (“DAC code”), an ideal DAC maintains a corresponding analog output voltage level. For example, a series of adjacent input codes (e.g., 00000000, 00000001, 00000010, and 00000011 in the case of binary input codes) applied sequentially at a DAC input results in a stair-stepped output waveform shape with each step up of equivalent magnitude to the previous step up.
In the case of a stepper motor, each DAC input code results in a different mechanical rotational position of the stepper motor rotor. As such, any particular section of the waveform is stair-stepped upward for increasing currents and stair-stepped downward for decreasing currents. Micro-stepping resolution, the number of steps in an electrical 360 degree revolution, is limited by the accuracy with which each motor winding current level can be regulated during the constant current portion of each step. That is, once a DAC input code is applied and the winding current reaches a level corresponding to the top of the DAC step up or to the bottom of the DAC step down, that level of winding current is regulated to avoid any further mechanical rotation or vibration of the rotor until a different DAC input code is applied. Absent such regulation, factors such as supply voltage variations and changes in mechanical loads on the stepper motor may cause winding current to vary during the duration of the desired step.
Like many methods of electrical voltage and current regulation, stepper motor winding current regulation may be hysteresis-based. That is, the regulation method may allow the winding current to ramp up to a set-point level corresponding to an applied DAC code. The set-point level of winding current is referred to herein as “ITRIP.” When a forward voltage is applied across the winding, winding current ramps up during a period referred to herein as the “t_ON” period. When the winding current reaches ITRIP, the regulation mechanism then either disallows active drive to the winding or reverses voltage polarity across the winding during a period referred to herein as the “t_OFF” period. During a first portion or all of the t_OFF period referred to herein as the “decay” period, the winding current ramps down toward zero. If the negatively-sloped winding current reaches zero, the regulation mechanism may maintain the winding current at zero for the duration of the t_OFF period until allowing another ramp up to ITRIP. The sum of the t_ON period and the t_OFF period is referred to herein as a PWM cycle.
It is noted that multiple PWM cycles may occur over the duration of any step associated with a given DAC input code. For example, a stepper motor controlling vertical paper positioning in an inkjet printer may move to a particular position and remain at that position for hundreds of milliseconds while the inkjet head moves across the sheet of paper horizontally or even for several seconds to allow ink to dry on the sheet of paper before ejecting the sheet. Several or many PWM current regulation cycles may occur during these periods while the same DAC input code is applied to or latched into the vertical positioning stepper motor to create a corresponding DAC analog output level.
The slope of the decay waveform associated with the t_OFF period is important in the overall scheme of regulating the stepper motor current for the duration of a given step. The inability of conventional decay modes to precisely regulate average current level and ripple in the windings at a particular step may significantly limit micro-stepping resolution for a given stepper motor configuration.
FIG. 1 is a prior-art schematic diagram of a typical “H-bridge” switching apparatus 100 used to regulate stepper motor current. Four switches S1-S4 are sequenced by current regulation logic (not shown) to control current through the winding 110. The current paths 115, 120, and 125 and corresponding directions are indicated by the dashed lines. Feedback to the current regulation logic is provided by a voltage drop across a sense resistor 130 corresponding to current flowing along the paths 115 and 120.
FIG. 2 is a series of prior-art waveform diagrams illustrating various modes of operation of the H-bridge 100 associated with known methods of stepper motor current regulation. Considering now FIG. 2 in light of FIG. 1, the regulation logic turns switches S1 and S2 to a conductive state to ramp up current along the path 115 and through the winding 110 during the t_ON period 215 as shown in the three graphs of FIG. 2. Feedback from the sense resistor 130 may be ignored by the regulation logic during a blanking period tBLANK in order to avoid erratic feedback caused by abrupt current changes in the winding 110 at the start of t_ON.
The three graphs of FIG. 2 illustrate three different decay modes implemented by various prior-art current regulation logic circuits in conjunction with the H-bridge 100. Each decay mode controls the rate of decay of the current waveform through the stepper motor winding. The motor winding current decay rate is controlled in an effort to control jitter in the overall current waveform, particularly at waveform peaks where the slope of the current waveform changes direction and at zero cross-over points where the waveform changes polarity.
The decay portion 220 of the slow decay waveform 222 corresponds to the current path 125 of FIG. 1, implemented by enabling switches S2 and S3 to a conductive state and disabling switches S1 and S4 of the H-bridge 100. Disabling switches S1 and S4 prevents motor drive voltage VM from being applied across the motor winding 110. Enabling switches S2 and S3 allows the slow decay current waveform 220 to slowly dissipate through internal resistance associated with the current path 125. A potential problem exists with slow decay mode, particularly for smaller regulated currents. Energy stored in the inductance of the motor winding 110 may not dissipate completely and take the slow decay current waveform 220 to a sufficiently low level by the end of the t_OFF period and prior to the start of the next PWM cycle. This problem may impose a lower limit on the magnitude of current that may be finely regulated and thus on the driver DAC step size and resolution.
The decay portion 230 of the fast decay waveform 232 corresponds to the current path 120 of FIG. 1, implemented by enabling switches S3 and S4 to a conductive state and disabling switches S1 and S2 of the H-bridge 100. The latter configuration of switches reverses the polarity of voltage applied across the motor winding 110, causing the decay portion 230 of the fast decay current waveform 232 to rapidly decrease to zero. A potential problem with fast decay mode is that the discharge rate of the motor winding 110 during the decay period associated with the decay waveform 230 is approximately equal to the charge rate associated with the t_ON period 215. This may result in choppy regulation reflected as excessive ripple in the overall current waveform, particularly at waveform peaks where the DAC step period is large relative to the DAC step magnitude. The latter problem may impose a limitation on the DAC step size and resolution as the step size becomes low relative to the magnitude of the ripple.
A fixed mixed-mode of decay 240 is known. Fixed mixed-mode is implemented by initially configuring the switches S1-S4 of the H-bridge 100 as described above for fast decay mode 232 to create a period of fast decay t_FAST 250 corresponding to decay waveform portion 255. The H-bridge 100 is then switched to the configuration described above for slow decay mode 222 to create a period of slow decay t_SLOW 260 corresponding to the decay waveform portion 265. One problem with fixed mixed decay mode is that the periods 250 and 260 associated with the fast and slow decay periods, respectively, typically result from a compromise for a given motor and supply voltage. Also, a particular ratio of fixed periods 250 and 260 may be better suited to some current levels and waveform slopes than to others.